﻿
using System;
using System.Data;
using Npgsql;
using Forums.Data;
namespace Forums.Domain
{
	class Program
	{
		
		public static void Main(string[] args)
		{
			UserDaoPGImpl u1 = new UserDaoPGImpl();	

			//GetUserDetails
//			User userFromDB = u1.GetUser(4);
//			Console.WriteLine(userFromDB.UserId);
//			Console.WriteLine(userFromDB.FirstName);
//			Console.WriteLine(userFromDB.LastName);
//			Console.WriteLine(userFromDB.UserName);
//			Console.WriteLine(userFromDB.UserPwd);
//			Console.WriteLine(userFromDB.Email);
//			Console.WriteLine(userFromDB.City);
//			Console.WriteLine(userFromDB.Country);
//			Console.WriteLine(userFromDB.TimezoneCode);
//					
//			
//			//Delete User			
//		u1.DeleteUser(5);
			

			//Insert and update
			User user1 = new User();
			//user1.UserId = 4;
			user1.FirstName = "Roopa";
			user1.LastName ="gopal";
			user1.UserName ="X";
			user1.UserPwd ="gopal";
			user1.Email="roopa1@gmail.com";
			user1.City ="Herndon";
			user1.Country = "US";
			user1.TimezoneCode="8/17/2012";
			
			u1.SaveorUpadateUser(user1);			
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
		}
		
	}
}
